package com.bcxj.apidriver.service;

import com.bcxj.apidriver.client.ServiceDriverUserClient;
import com.bcxj.internalcommon.dto.ResponseResult;
import com.bcxj.internalcommon.entity.DriverUserWorkStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.xml.ws.Action;

/**
 * ClassName: DriverUserWorkStatusService
 * Package: com.bcxj.apidriver.service
 * Description:
 *
 * @Author BCXJ
 * @Create 2024/11/17 16:17
 * @Version 1.0
 * @Since 1.0
 */
@Service
public class DriverUserWorkStatusService {
    @Autowired
    private ServiceDriverUserClient serviceDriverUserClient;

    /**
     * 修改司机的工作的状态
     * @param driverId
     * @param workStatus
     * @return
     */
    public ResponseResult updateWorkStatus(Long driverId, Integer workStatus) {
        DriverUserWorkStatus driverUserWorkStatus = new DriverUserWorkStatus();
        driverUserWorkStatus.setDriverId(driverId);
        driverUserWorkStatus.setWorkStatus(workStatus);
        return serviceDriverUserClient.updateDriverWorkStatus(driverUserWorkStatus);
    }
}
